package moxl.xpath.functions;

import moxl.xpath.parser.states.step.Function;
import moxl.xpath.parser.types.XPathEvaluationException;
import moxl.xpath.parser.types.AbstractXPathValue;

public class XPathFunctionIllegalArgumentException extends XPathEvaluationException
{

	public XPathFunctionIllegalArgumentException(Function function, int argumentIndex, AbstractXPathValue arg, Class<? extends AbstractXPathValue> expectedType)
	{
		super("Illegal type of argument to function " + function.getName() + " at index " + argumentIndex + ": argument was expected to be "
		        + expectedType.getName() + " but was of type " + arg.getClass().getName());
	}

}
